-pic Reference Manual

Kristoffer H. Rose
<kris@diku.dk>1 Ross Moore
<ross@mpce.mq.edu.au>2

Version /3β3    <>

Abstract:

This manual summarises the capabilities of the -pic package for typesetting graphs and diagrams in TEX.

A characteristic of -pic is that it is build around a "kernel drawing language" which is a concise notation for general graphics, ,
\begin{code}
\xy (3,0)*{A} ; (20,6)*+{B}*\cir{} **\dir{-}
? *_!/3pt/\dir{)} *_!/7pt/\dir{:}
?>* \dir{>} \endxy
\end{code}

$\displaystyle \docode$

was drawn by the -pic kernel code It is an object-oriented graphic language in the most literal sense: `objects' in the picture have `methods' describing how they typeset, stretch, etc., however, the syntax is rather terse.

Particular applications make use of "extensions" that enhance the graphic capabilities of the kernel to handle such diagrams as
\begin{code}
\xy *[o]=<40pt>\hbox{Round}=''o''*\frm{oo}
+<5em,-5em>@+,
(46,11)...
...,
''o'';''s''.''b'' **\crvs{-},
''o''.''b'';''s'' **\crvs{-}
\endxy
\end{code}

$\displaystyle \docode$

which was typeset by using the `curve' and `frame' extensions.

All this is made accesible through "features" that provide convenient notation such that users can enter special classes of diagrams in an intuitive form, , the diagram
\begin{code}
\xygraph{~{(1.5,0):(0,.7)::}
[]Z ( [u]X :_f ? , [l]Y :^g ? )
[ul]...
...^x ''X'' ,
? :@/_.5pc/ _y ''Y'' ,
? :@{-->} \vert{(x,y)} ''xy'' ) }
\end{code}

$\displaystyle \docode$

was typeset using the `graph' features by the -pic input lines

We will not describe the combination of features in this manual: refer to the User's Guide [#!R94:XY-picUG!#] for a tutorial on how diagrams like the above can be typeset.

The current implementation is programmed completely within ``standard TEX and METAFONT'', , using TEX macros (no |s) and fonts designed using METAFONT. Optionally a special `backend' makes it possible to produce DVI files with `specials' for PostScript4 drivers.